home *** CD-ROM | disk | FTP | other *** search
- class BrokenToys extends MovieClip
- {
- var available_to_hit;
- var HitSquare;
- var HitOver;
- function BrokenToys()
- {
- super();
- this.available_to_hit = true;
- }
- function onEnterFrame()
- {
- if(!_global.Rescuer.invincible)
- {
- if(this.HitSquare.hitTest(_global.Rescuer) && this.available_to_hit)
- {
- _global.Rescuer.loseFollower();
- this.available_to_hit = false;
- }
- else if(!this.HitSquare.hitTest(_global.Rescuer) && !this.available_to_hit)
- {
- this.available_to_hit = true;
- }
- if(!this.HitSquare.hitTest(_global.Rescuer) && this.HitOver.hitTest(_global.Rescuer))
- {
- _global.Footer.addScore(2);
- }
- }
- }
- }
-